package kr.co.ljw.main;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

/**
 * swt main
 * 
 * @author 오스템임플란트 jw
 * @since 2013. 6. 5.
 * @version 1.0
 * @see
 * 
 * <pre>
 * << 개정이력(Modification Information) >>
 *   
 *	  수정일  		수정자				수정내용		
 *	----------		------		------------------------
 *	2013. 6. 5.    jw				최초 생성
 *
 * </pre>
 */
public class Main {
	public static void main(String args[]){
		Display display = new Display();
		
		Shell shell = new Shell(display);
		shell.setText("Hello World shell");
		shell.setBounds(100, 100, 200, 50);
		shell.setLayout(new FillLayout());
		
		Label label = new Label(shell, SWT.CENTER);
		label.setText("Hello World label");
		
		Color red = new Color(display, 255, 0, 0);
		label.setForeground(red);
		shell.open();
		
		while(!shell.isDisposed()){
			if(!display.readAndDispatch())
				display.sleep();
		}
		red.dispose();
		display.dispose();
	}
}